﻿using DFGK_WMS.Model.Models;
using DFGK_WMS.Model.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK_WMS.IRepository
{
    public  interface IAreaRepository:IBaseRepository<TArea>
    {
        /// <summary>
        /// 添加库区
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        bool AddArea(AreaDto obj,out string message);
        /// <summary>
        /// 库区显示（弃用）
        /// </summary>
        /// <param name="kcode"></param>
        /// <param name="kname"></param>
        /// <param name="kid"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<AreaDto> GetAreaList(string kname,int kid,int pageIndex,int pageSize,out int totalCount);

        /// <summary>
        /// 库区显示
        /// </summary>
        /// <param name="kname"></param>
        /// <param name="kid"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<TArea> GetAreanList(string kname, int wid, int pageIndex, int pageSize, out int totalCount);
        /// <summary>
        /// 删除库区
        /// </summary>
        /// <param name="uid"></param>
        /// <returns></returns>
        bool DelArea(int uid);
        /// <summary>
        /// 修改库区信息
        /// </summary>
        /// <param name="u"></param>
        /// <returns></returns>
        bool UpdateArea(AreaDto u, out string message);
        /// <summary>
        /// 根据id获取数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        TArea GetAreaById(int id);
        /// <summary>
        /// 获取库房(仓库)信息
        /// </summary>
        /// <returns></returns>
        List<TWarehouse> GetTwarehouseList();

        /// <summary>
        /// 根据库房Id获取库区
        /// </summary>
        /// <param name="wid"></param>
        /// <returns></returns>
        List<TArea> GetWhIdAreaList(int wid);
    }
}
